/*********************************************************************************
Organization 					: 				Georgia Institute of Technology
  
Institute 						:				Cognitive Computing Group(CCL)
 
Authors							: 				Santiago Ontanon
 												
Class							:				PlayerExistsCondition
 
Function						: 				Provides a class for whether a player 
 												exists condition
****************************************************************************/
package planninglanguage.softconditions;

import base.WargusGameState;


public class PlayerExistsSoftCondition extends SoftCondition {

	int m_playerID;
	
	public PlayerExistsSoftCondition(int a_playerID)
	{
		m_playerID = a_playerID;
	}
	public String toString(int tabs)
	{
		String n = super.toString(tabs);
		n = n + "Player Id is:" + m_playerID;
		return n;
	}
	public float test(WargusGameState a_gameState)
	{
		if (a_gameState.getPlayer(m_playerID)!=null) return 1.0f;
		return 0.0f;
	}
}